import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/system/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/system/user/current',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/system/out',
    method: 'get'
  })
}
export function userList(data) {
  return request({
    url: '/system/user/list',
    method: 'post',
    data
  })
}

export function roleList() {
  return request({
    url: '/system/role/dict/list',
    method: 'get'
  })
}

export function saveUser(data) {
  return request({
    url: '/system/user/save',
    method: 'post',
    data
  })
}

